package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 体检对象 biz_checkup
 *
 * @author happiness
 * @date 2024-03-27
 */
@Schema(name = "Checkup", description = "体检")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_checkup")
public class Checkup extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "checkup_id", type = IdType.ASSIGN_ID)
    private Long checkupId;

    
    


    /**
     * 人员类别：上岗前
     */
    @Schema(description = "人员类别：上岗前")
    @Excel(name = "人员类别")
    private String checkupCategory;

    /**
     * 体检时间
     */
    @Schema(description = "体检时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "登记日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date checkupTime;
    /**
     * 体检编号
     */
    @Schema(description = "体检编号")
    @Excel(name = "体检编号")
    private String checkupRef;

    /**
     * 性别
     */
    @Schema(description = "性别")
    @Excel(name = "性别")
    private String sex;
    
    /**
     * 年龄
     */
    @Schema(description = "年龄")
    @Excel(name = "年龄")
    private String age;

    /**
     * 毒害种类和名称：噪声
     */
    @Schema(description = "毒害种类和名称：噪声")
    @Excel(name = "毒害种类和名称")
    private String poisonType;

    /**
     * 危害等级
     */
    @Schema(description = "危害等级")
    @Excel(name = "危害等级")
    private String harmGrade;

    @Schema(description = "岗位或工种")
    @Excel(name = "岗位或工种")
    private String typeOfWork;

    @Schema(description = "接害工龄")
    @Excel(name = "接害工龄")
    private String seniority;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 工号
     */
    @Schema(description = "工号")
    @Excel(name = "工号")
    private String empno;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    @Excel(name = "姓名")
    private String nickName;

    /**
     * 身份证号
     */
    @Schema(description = "身份证号")
    @Excel(name = "身份证号")
    private String idCard;

    /**
     * 总检建议
     */
    @Schema(description = "总检建议")
    @Excel(name = "总检建议")
    private String advice;

    /**
     * 总检综述
     */
    @Schema(description = "总检综述")
    @Excel(name = "总检综述")
    private String summarize;

    /**
     * 是否删除|0-否 1-是
     */
    private String deleted;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("checkupId", getCheckupId())
                .append("checkupCategory", getCheckupCategory())
                .append("checkupTime", getCheckupTime())
                .append("checkupRef", getCheckupRef())
                .append("poisonType", getPoisonType())
                .append("userId", getUserId())
                .append("nickName", getNickName())
                .append("idCard", getIdCard())
                .append("advice", getAdvice())
                .append("summarize", getSummarize())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("version", getVersion())
                .toString();
    }
}
